/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package im.resources.monitors;

/**
 *
 * @author brownstone
 */
public class RAMMonitor {
    private float ram,ramOld;

	public RAMMonitor() {
		ram = (float)(Math.random());
		ramOld = ram;
	}

	public float check(){

		if ( ((int)(Math.random()*1000) % 100) < 3)
			ram = (float)(Math.random());

		else
			ram = 0.95f * ramOld + 0.05f * (float)(Math.random());


		ramOld = ram;

	//	System.out.println("Valore ram = "+ram);
		return ram;
	}
}
